﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;

namespace Logic
{
   public class Calculator
    {
        public static int GetTotalPrice(Autopark autopark)
        {


            int totalPrice = 0;

            List<Abstract_auto> autos = autopark.Autos;



            foreach (Abstract_auto auto in autos)
            {
                totalPrice = totalPrice + auto.Price;
            }


            return totalPrice;
        }

    }
}
